---
--- Created by mick.
--- DateTime: 17-11-24 下午2:11
---
return [[

				<!-- 一个文章开始   -->
				<article class="article-item">
					<section style="color:#8590a6;line-height:1;font-size:15px;margin-bottom:14px;">来自:程序语言</section>
					<section>
						<ul>
							<li style="width:35px;height:35px;display:inline-block;border-radius:10px;overflow:hidden;"><img src="/static/head.jpg" alt="" style="width:35px;"></li>
							<li style="color:inherit;font-weight:600;font-size:15px;">Mick,</li>
							<li style="white-space:nowrap;word-break:break-word;font-size:14px;color:#262626;content: '\FF0C'">hi</li>
						</ul>
					</section>

					<section id="title" style="color:inherit;font-size:18px;font-weight: 600;line-height: 1.6;margin-top:14px;"> </section>

					<section class="article_content">
<!-- 						<div style="position:relative;display:block;width:190px;height:105px;margin-top:-2px;margin-right:18px;margin-bottom:4px;overflow:hidden;background-position:50%;background-size:cover;float:left;">
							<img style="width:100%;position:absolute;" src="https://pic2.zhimg.com/50/v2-ccf16c07d356839d9f071a0b455625c9_400x224.jpg" alt="">
						</div> -->
						<div id="content" style="display:block;min-height:100px;max-width:654px;min-width:0px;margin-top:-2px;margin-right:18px;margin-bottom:4px;overflow:hidden;position:relative;left:-20px;">

							<!--文章内容-->

						</div>
					</section>
					<section style="margin-top:5px;">
						<button class="layui-btn layui-btn-sm layui-btn-primary" style="border:none;">
						    <i class="layui-icon">&#xe618;</i>有用
						</button>
						<button class="layui-btn layui-btn-sm layui-btn-primary" style="border:none;">
						    <i class="layui-icon">&#xe60a;</i>浏览
						</button>

					</section>
				</article>

			</article>
]]..require("app/view/right_bar")..[[
		</article>
]]..require("app/view/footer")..[[
	</main>
	<script type="text/javascript" zIndex="-1" color="30,159,255" opacity="0.8" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
</body>
<script src="/static/layui/layui.js"></script>
<script src="/static/js/jquery-3.2.1.min.js"></script>

<script src="/static/editor.md/lib/marked.min.js"></script>
<script src="/static/editor.md/lib/prettify.min.js"></script>

<script src="/static/editor.md/lib/raphael.min.js"></script>
<script src="/static/editor.md/lib/underscore.min.js"></script>
<script src="/static/editor.md/lib/sequence-diagram.min.js"></script>
<script src="/static/editor.md/lib/flowchart.min.js"></script>
<script src="/static/editor.md/lib/jquery.flowchart.min.js"></script>


<script src="/static/editor.md/editormd.min.js"></script>


<script type="text/javascript">

	//获取url中的参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
    $(function() {
        var content;
        var id = getUrlParam("id");

        $.get("/list/detail/"+id, function(markdown) {
            makedown = $.parseJSON(markdown)
            markdown = makedown["content"]

		    content = editormd.markdownToHTML("content", {
                markdown        : markdown ,//+ "\r\n" + $("#append-test").text(),
                //htmlDecode      : true,       // 开启 HTML 标签解析，为了安全性，默认不开启
                htmlDecode      : "style,script,iframe",  // you can filter tags decode
                //toc             : false,
                tocm            : true,    // Using [TOCM]
                //tocContainer    : "#custom-toc-container", // 自定义 ToC 容器层
                //gfm             : false,
                //tocDropdown     : true,
                // markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签
                emoji           : true,
                taskList        : true,
                tex             : true,  // 默认不解析
                flowChart       : true,  // 默认不解析
                sequenceDiagram : true,  // 默认不解析
            });

            //console.log("返回一个 jQuery 实例 =>", testEditormdView);

            // 获取Markdown源码
            //console.log(testEditormdView.getMarkdown());

            //alert(testEditormdView.getMarkdown());

            $("#title").html(makedown["title"]);
        });

        // testEditormdView2 = editormd.markdownToHTML("test-editormd-view2", {
        //     htmlDecode      : "style,script,iframe",  // you can filter tags decode
        //     emoji           : true,
        //     taskList        : true,
        //     tex             : true,  // 默认不解析
        //     flowChart       : true,  // 默认不解析
        //     sequenceDiagram : true,  // 默认不解析
        // });
    });
</script>

]]..require("app/view/common_script")..[[
]]